#ifndef AI_HH_
# define AI_HH_

# include <math/vector.hh>

class AI
{
public:
  // actions types
  static const int NOTHING = 0;
  static const int MOVE = 1;
  static const int ROTATE = 2;
  static const int SHOOT = 3;

  AI (Vector3f* dir, Vector3f* speed, float speed_coef);
  ~AI ();

  virtual void move (const Vector3f& pos) = 0;
  virtual void act (const Vector3f& pos) = 0;

  void target (Vector3f t) { target_ = t; }

  const Vector3f& target () const { return target_; }
  const Vector3f* move_to () const { return move_to_; }
  const Vector3f& rotate () const { return rotate_; }
  int action () const { return action_; }

protected:
  int action_;
  Vector3f target_;

  Vector3f* move_to_;
  Vector3f rotate_;

  // FIXME: Erase it with the new architecture, interact with the object.
  Vector3f* speed_;
  float speed_coef_;
};

class BasicAI : public AI
{
public:
  BasicAI (Vector3f* dir, Vector3f* speed, float speed_coef);
  ~BasicAI ();

  void move (const Vector3f& pos);
  void act (const Vector3f& pos);
};

# endif /// !AI_HH_
